import React from 'react'
import {Input,Button,List} from 'antd';
const NewTodoList=(props)=>{
    return(
        <div style={{marginTop:'10px',marginLeft:'10px'}}>
            <div>
                <Input placeholder="todo List" 
                style={{width:'300px',marginRight:'10px'}}
                onChange={props.handerChange}
                value={props.inputValue}
                />
                <Button type="primary" onClick={props.handerLitem}>提交</Button>
            </div>
            <List style={{marginTop:'10px',width:'300px'}}
            bordered
            dataSource={props.list}
            renderItem={(item,index) => (<List.Item onClick={()=>{props.delecteItem(index)}}>{item}</List.Item>)}
            />
        </div>
        
    )
    
}
export default NewTodoList